(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
Rewrite Strategy: FULL
(1) CpxTrsToCpxRelTrsProof (BOTH BOUNDS(ID, ID) transformation)
Transformed TRS to relative TRS where S is empty.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
fact(X) → if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
prod(0, X) → 0
prod(s(X), Y) → add(Y, prod(X, Y))
if(true, X, Y) → X
if(false, X, Y) → Y
zero(0) → true
zero(s(X)) → false
p(s(X)) → X
S is empty.
Rewrite Strategy: FULL
(3) InfiniteLowerBoundProof (EQUIVALENT transformation)
The loop following loop proves infinite runtime complexity:
The rewrite sequence
fact(X) →+ if(zero(X), s(0), prod(X, fact(p(X))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [2,1].
The pumping substitution is [ ].
The result substitution is [X / p(X)].
(4) BOUNDS(INF, INF)